1. Field of the Invention
The present invention relates to a method for referring to an address used for reading or writing vector data, and a vector processor.
2. Description of the Related Art
Traditionally, data on memory is irregularly read or written in image processing and the like, and there are proposed various methods for efficiently performing such processing.
For example, in image processing, when storing a particular block of data of an image data from memory in a register, pixel data for a line of the block is stored in the register, and then an address on the memory which is separated from the address of the data by a predetermined length is referred to in order to read pixel data for the next line of the block.
As a method for referring to such a complicated address, a technique described in a reference document, “SuperComputer” (by Shigeo Nagashima and Yoshikazu Tanaka; Ohmsha, Ltd.) is known.
In this reference document, a technique is disclosed wherein indirect index vector reference is used when reading multi-dimensional array data from memory into a vector register or writing it from the vector register to the memory.
The indirect index vector reference is a method in which lists (index vectors) storing the order of addresses on memory to be referred to are supplied, and a particular address on the memory is indirectly referred to by referring to the lists in sequence.
By using such indirect index vector reference, it is possible to perform complicated address reference on memory.
(Non-Patent Document 1)
“Super Computer” by Shigeo Nagashima and Yoshikazu Tanaka; Ohmsha, Ltd.; pp. 35–41
In prior-art techniques, however, it is necessary to store an index vector in a vector register, and this causes the following problems. First, since a procedure for supplying an index vector is required, the code size and the number of process cycles of the program are increased.
Second, as the number of index vectors to be provided increases, the number of vector registers for storing the index vectors also increases, thereby causing shortage of the number of register resources to be used for the original operation and therefore causing decrease in the efficiency of the operation.
The object of the present invention is to efficiently perform indirect index vector reference.